package com.thinkgem.jeesite.common.web.webservice;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Response<T> {
	private ResponseState responseState;
	@XmlAnyElement(lax=true)
	private T data;
	private PagingInfo pagingInfo;

	public ResponseState getResponseState() {
		return responseState;
	}

	public void setResponseState(ResponseState responseState) {
		this.responseState = responseState;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public PagingInfo getPagingInfo() {
		return pagingInfo;
	}

	public void setPagingInfo(PagingInfo pagingInfo) {
		this.pagingInfo = pagingInfo;
	}

	public void setStateCode(int code) {
		ResponseState responseState = new ResponseState();
		responseState.setCode(code);
		this.setResponseState(responseState);
	}
}
